/*
 * 项   目：code-generator
 * 作   者：LuoYiMin
 * 邮   箱：1725990142@qq.com
 * 创建时间：2018/12/28 8:46
 */
package com.roin.util.code.generator.model;

public class HtmlConfigColumn {
    private String  field;
    private String  title;
    private String  width ="-1";
    private boolean sort  =false;
    private boolean fixed =false;
    private boolean hide  =false;
    private boolean templet=false;
    private String align="center";
    /**
     * 是否作为筛选条件
     */
    private boolean filterColumn=false;
    /**
     * 筛选条件方式：text,select
     */
    private String filterType="text";

    /****add表单配置*****/
    /**
     * 是否需要出现在add表单，只有为true，add表单的其他配置才起作用
     */
    private boolean needInsert=true;
    /**
     * form控件类型：text,select,radio,checkbox,switch,date
     */
    private String inputType="text";
    /**
     * 是否必填
     */
    private boolean required=false;
    /**
     * 是否在Add表单中作为隐藏域
     */
    private boolean hideInAddForm=false;
    /**
     * 是否可编辑，用于在数据修改时控制
     */
    private boolean editable=true;
    /**
     * 是否提交，用于在数据修改时控制
     */
    private boolean submit=true;
    /**
     * 最大输入长度
     */
    private String maxLength ="-1";
    /**
     * 提示语
     */
    private String placeholder;

    /*------只有inputType=date下面的配置才起作用-----*/

    /**
     * 日期选择器类型：year，month，date，time，datetime
     */
    private String dateType="date";
    /**
     * 范围时间选择器，当inputType=date才起效
     */
    private boolean range=false;
    /**
     * 日期格式化，当inputType=date才起效
     */
    private String format;
    /**
     * 初始日期时间，当inputType=date才起效
     */
    private String defaultDate;
    /**
     * 最小日期时间，当inputType=date才起效
     */
    private String minDate;
    /**
     * 最大日期时间，当inputType=date才起效
     */
    private String maxDate;

    public HtmlConfigColumn() {
    }

    public HtmlConfigColumn(String field, String title, String width, boolean sort, boolean fixed, boolean hide, boolean templet, String align, boolean filterColumn, boolean needInsert, boolean required, boolean editable ) {
        this.field = field;
        this.title = title;
        this.width = width;
        this.sort = sort;
        this.fixed = fixed;
        this.hide = hide;
        this.templet = templet;
        this.align = align;
        this.filterColumn = filterColumn;
        this.needInsert = needInsert;
        this.required = required;
        this.editable = editable;
    }

    /****add表单配置 end*****/



    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }

    public boolean isSort() {
        return sort;
    }

    public void setSort(boolean sort) {
        this.sort = sort;
    }

    public boolean isFixed() {
        return fixed;
    }

    public void setFixed(boolean fixed) {
        this.fixed = fixed;
    }

    public boolean isHide() {
        return hide;
    }

    public void setHide(boolean hide) {
        this.hide = hide;
    }

    public boolean isTemplet() {
        return templet;
    }

    public void setTemplet(boolean templet) {
        this.templet = templet;
    }

    public String getAlign() {
        return align;
    }

    public void setAlign(String align) {
        this.align = align;
    }

    public boolean isFilterColumn() {
        return filterColumn;
    }

    public void setFilterColumn(boolean filterColumn) {
        this.filterColumn = filterColumn;
    }

    public String getFilterType() {
        return filterType;
    }

    public void setFilterType(String filterType) {
        this.filterType = filterType;
    }

    public boolean isNeedInsert() {
        return needInsert;
    }

    public void setNeedInsert(boolean needInsert) {
        this.needInsert = needInsert;
    }

    public boolean isRequired() {
        return required;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }

    public boolean isEditable() {
        return editable;
    }

    public void setEditable(boolean editable) {
        this.editable = editable;
    }

    public String getDateType() {
        return dateType;
    }

    public void setDateType(String dateType) {
        this.dateType = dateType;
    }

    public boolean isRange() {
        return range;
    }

    public void setRange(boolean range) {
        this.range = range;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getDefaultDate() {
        return defaultDate;
    }

    public void setDefaultDate(String defaultDate) {
        this.defaultDate = defaultDate;
    }

    public String getMinDate() {
        return minDate;
    }

    public void setMinDate(String minDate) {
        this.minDate = minDate;
    }

    public String getMaxDate() {
        return maxDate;
    }

    public void setMaxDate(String maxDate) {
        this.maxDate = maxDate;
    }

    public boolean isHideInAddForm() {
        return hideInAddForm;
    }

    public void setHideInAddForm(boolean hideInAddForm) {
        this.hideInAddForm = hideInAddForm;
    }

    public String getMaxLength() {
        return maxLength;
    }

    public void setMaxLength(String maxLength) {
        this.maxLength = maxLength;
    }

    public String getPlaceholder() {
        return placeholder;
    }

    public void setPlaceholder(String placeholder) {
        this.placeholder = placeholder;
    }

    public String getInputType() {
        return inputType;
    }

    public void setInputType(String inputType) {
        this.inputType = inputType;
    }

    public boolean isSubmit() {
        return submit;
    }

    public void setSubmit(boolean submit) {
        this.submit = submit;
    }
}
